//package cn.itcast.springboot.config;
//
//import cn.itcast.springboot.pojo.DataSourceProperties;
//import com.alibaba.druid.pool.DruidDataSource;
//import org.springframework.boot.context.properties.EnableConfigurationProperties;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import javax.sql.DataSource;
//
///**
// * @package cn.itcast.springboot.config
// * @description: 注入Druid数据源
// * @author: 许超越
// * @date 2019/6/9 15:20
// * @version: V1.0
// */
//@Configuration
//@EnableConfigurationProperties(DataSourceProperties.class)
//public class DataSourceConfig {
//
////    @Bean
//    public DataSource dataSource(DataSourceProperties properties) {
//        DruidDataSource dataSource = new DruidDataSource();
//        dataSource.setDriverClassName(properties.getDriverClassName());
//        dataSource.setUrl(properties.getUrl());
//        dataSource.setUsername(properties.getUsername());
//        dataSource.setPassword(properties.getPassword());
//        return dataSource;
//    }
//}
